//
//  WMBannerAdView.h
//  Pods-WonderMobSDK_Example
//
//  Created by zero on 2020/2/20.
//

#import <UIKit/UIKit.h>

#import "WMBaseAd.h"

@class WMBannerAdView, BUDislikeWords, WMAdId;

NS_ASSUME_NONNULL_BEGIN

@protocol WMBannerAdDelegate <NSObject>

@optional

/// 广告数据加载成功回调
/// @param bannerAd WMBannerAdView 实例
- (void)wm_bannerAdDidLoadSuccess:(WMBannerAdView *)bannerAd;

/// 视频广告各种错误信息回调
/// @param bannerAd WMBannerAdView 实例
/// @param error 具体错误信息
- (void)wm_bannerAd:(WMBannerAdView *)bannerAd didFailWithError:(NSError * _Nullable)error;

/// 需要在点击叉以后 在这个回调中移除视图，否则，会出现用户点击叉无效的情况
/// @param bannerAd WMBannerAdView 实例
/// @param filterWords [BUDislikeWords] 关闭的原因
- (void)wm_bannerAd:(WMBannerAdView *)bannerAd
  dislikeWithReason:(NSArray<BUDislikeWords *> * _Nullable)filterWords;

@end

@interface WMBannerAdView : WMBaseAd


//- (instancetype)initWithFrame:(CGRect)frame
//               viewController:(UIViewController *)viewController
//                    adIdModel:(WMAdId *)adIdModel;

/// 构造方法
/// @param adIdModel adModel
/// @param posId posId
/// @param frame banner frame
/// @param viewController 用于展示广告的 controller
- (instancetype)initWithAdIdModel:(WMAdId *)adIdModel
                            posId:(NSString *)posId
                            frame:(CGRect)frame
                   viewController:(UIViewController *)viewController;

/// 展示广告
- (void)showBannerAd;

/// 移除广告
- (void)removeAd;

/// 委托对象
@property (nonatomic, weak) id<WMBannerAdDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
